import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

// let changecityname = sessionStorage.city || "西安"
let changecityname = localStorage.city || "西安"
let state = {
	city:changecityname 
}

let mutations = {
	changeCity(state,cityName){
		this.state.city = cityName
		// sessionStorage.city = cityName
		localStorage.city = cityName
	}
}

export default new Vuex.Store({
	state,
	mutations
})